package com.shenjinzheng.dk.user.api;

import com.shenjinzheng.dk.user.entity.UserInfo;
import com.shenjinzheng.dk.user.service.UserInfoService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shenjinzheng
 */
@Slf4j
@RestController
@RequestMapping("/userInfoApi")
public class UserInfoApi {

    @Resource
    private UserInfoService userInfoService;

    @GetMapping("{id}")
    public UserInfo getInfoById(@PathVariable String id){
        return this.userInfoService.getById(id);
    }
}
